
public class Test3 {
    public static int sum(int a, int b) {
        return a + b;
    }
    public static float sum(float a, float b) {
        return a + b;
    }
    public static double sum(double a, double b) {
        return a + b;
    }
    public static void main(String[] args) {
        int intSum = sum(5, 10);
        System.out.println("int总和: " + intSum);
        float floatSum = sum(5.5f, 2.3f);
        System.out.println("float总和: " + floatSum);
        double doubleSum = sum(5.5, 2.3);
        System.out.println("double总和: " + doubleSum);
    }
}